<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录-{wc:fun:_cfg("web_name")}</title>
<link rel="stylesheet" type="text/css" href="{G_TEMPLATES_STYLE}/css/comm.css"/>
<link rel="stylesheet" type="text/css" href="{G_TEMPLATES_STYLE}/css/index.css"/>
<link rel="stylesheet" type="text/css" href="{G_TEMPLATES_STYLE}/css/color.css"/>
<script type="text/javascript" src="{G_TEMPLATES_STYLE}/js/JQuery.js"></script>
<link href="{G_TEMPLATES_STYLE}/js/style.css" rel="stylesheet" type="text/css" />
<link href="{G_TEMPLATES_STYLE}/js/demo.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="{G_TEMPLATES_STYLE}/js/jquery.Validform.min.js"></script>
</head>
<body style="background: #fff;">
 <script type="text/javascript">
$(function(){		
	var demo=$(".registerform").Validform({
		tiptype:2,
	});	
})
</script>
<div class="login">

	<div class="login_header">
		<div class="login_top">
			<h1><a rel="nofollow" href="{G_WEB_PATH}"><img src="{G_UPLOAD_PATH}/{wc:fun:Getlogo()}"></a></h1>
			<p><a rel="nofollow" href="{G_WEB_PATH}" >返回首页</a></p>
		</div>
	</div>
	<div class="login_bg">
		<div id="loadingPicBlock" class="login_banner"><img src="{G_TEMPLATES_STYLE}/images/20120628180933540.jpg" width="542" height="360"></div>
		<div class="login_box" id="LoginForm">
		<form class="registerform" method="post" action="">
			<h3>用户登录</h3>
			<ul>				
				<li class="click">
					<span>账号：</span>
					<input class="text_password" name="username" type="text"  datatype="m | e" nullmsg="请填写帐号！" errormsg="手机号/邮箱！" />
				</li>
				<li class="ts"><div class="Validform_checktip">手机号/邮箱！</div></li>
				<li>
					<span>密码：</span>					
					<input class="text_password" name="password" type="password"  datatype="*6-20" nullmsg="请设置密码！" errormsg="密码范围在6~20位之间！"/>
					<span class="fog"><a href="{WEB_PATH}/member/finduser/findpassword">忘记密码？</a></span> 
				</li>								
				<li class="ts" id="pwd_ts"><div class="Validform_checktip">请输入登录密码</div></li>
				</li>
				 <li>
				 <span>验证码：</span>
				     <input class="text_verify" ajaxurl="{WEB_PATH}/member/user/codeCheck"
				            name="captcha" type="text"  datatype="*4-6" nullmsg="请输入验证码！" errormsg="请输入正确的验证码！"/>
				     <span class="fog"><img id="checkcode" src="{WEB_PATH}/api/checkcode/image/80_27/"/></span>
				 </li>
				 <li class="ts" id="pwd_ts"><div class="Validform_checktip">请输入验证码</div></li>
	
				<li class="end">
				<span><input name="submit" type="submit" value="登录" class="login_init" ></span>
				 <span><a id="hylinkRegisterPage" style="padding:0px 10px;" tabindex="4" class="reg" href="{WEB_PATH}/register">立即注册</a></span>

				</li>
			</ul>
			{wc:php:start}
				$conn_cfg = System::load_app_config("connect",'','api');
            {wc:php:end}
            {wc:if $conn_cfg['qq']['off']}
 			<div class="loginQQ">
			使用合作帐号登录<br>	
 				<span id="qq_login_btn">
 					<a href="{WEB_PATH}/api/qqlogin/"><img src="{G_TEMPLATES_STYLE}/images/qq.png" /></a>
 					<a href="{WEB_PATH}/api/wxloginpc/"><img src="{G_TEMPLATES_STYLE}/images/wx.png" /></a>
 				</span>
 			</div>

            {wc:if:end}			
			<input value="{G_HTTP_REFERER}" name="hidurl" type="hidden">
		</form>
		</div>
	</div>
</div>
<!--login 结束-->
<div class="g-copyrightCon" style="padding-top: 50px;">
	<div class="w1190">
		<div class="g-links">
			<a href="{WEB_PATH}">首页</a>
			<s></s>
				{wc:fun:Getheader('foot')}
  		</div>
  		<div class="g-copyright">{wc:fun:_cfg("web_copyright")}</div>
	</div>
</div>

<script type="text/javascript">

$("#registerform").Validform({
		tiptype:function(msg,o,cssctl){
			//msg：提示信息;
			//o:{obj:*,type:*,curform:*}, obj指向的是当前验证的表单元素（或表单对象），type指示提示的状态，值为1、2、3、4， 1：正在检测/提交数据，2：通过验证，3：验证失败，4：提示ignore状态, curform为当前form对象;
			//cssctl:内置的提示信息样式控制函数，该函数需传入两个参数：显示提示信息的对象 和 当前提示的状态（既形参o中的type）;
			if(!o.obj.is("form")){//验证表单元素时o.obj为该表单元素，全部验证通过提交表单时o.obj为该表单对象;
				//var objtip=o.obj.siblings(".Validform_checktip");
				var objtip=o.obj.parent().next().find(".Validform_checktip");
				cssctl(objtip,o.type);
              		  if(o.type==3){
                   			 $("#checkcode").click();
              		}
		objtip.text(msg);
			}else{
				var objtip=o.obj.find("#msgdemo");
				cssctl(objtip,o.type);
				objtip.text(msg);
			}
		},
		callback:function(data){
			if(data.status == -1){
				alert(data.msg);
			}else{
				window.location.href='{WEB_PATH}/member/home/userindex';
			}
		},
		ajaxPost:true
});

$("#checkcode").attr("data",$("#checkcode").attr("src"));
$("#checkcode").click(function(){
	$(this).attr("src",$(this).attr("data")+"&="+new Date().getTime());
});
</script>
</body>
</html>